<!-- 招聘人列表 -->
<template>
	<view class="pm20">
		<view class="pr display-flex">
			<view class=" flex-1">
				<icon type="search" size="20" class="xzczxertxrtzw"></icon>
				<input type="text" class="kkxcxztrtr" placeholder="请输入招聘员姓名" v-model="realName" confirm-type="search"
					@confirm="init" />
			</view>
			<view class=" ml20 vertical-center" v-if="realName">
				<button type="primary" size="mini" class=" fz26 fgfdvgrt5erfe" @tap="init">搜索</button>
			</view>
		</view>
	</view>
	<view class="w100 bgff xcxtrytcrty">
		<view class=" display-flex pt10 pm10 btm" v-for="item in list" @tap="cxxzfdft(item)">
			<view class="xczxerxetrttwer">
				<frImage :src="item.headUrl"></frImage>
			</view>
			<view class="flex-1 ml20">
				<view class="fz32">
					{{item.realName}}
				</view>
				<view class="fz24 z9">
					手机号:{{item.mobile}}
				</view>
			</view>
			<view class=" vertical-center">
				<text class=" iconfont icon-rightyou fz32"></text>
			</view>
		</view>
		<view class="vertical-center mt100" v-if="list.length<=0">
			<image src="../../static/img/noData.png" class="xczxcertfdgtrr"></image>
			<view class="mt20 z9 fz24">
				暂无数据!
			</view>
		</view>
	</view>
</template>
<script lang="ts" setup>
	import { ref } from "vue"
	import { dxrequest } from "@/util/index.js"
	import frImage from "@/components/fr-image/fr-image.vue"
	const emit = defineEmits([
		'close',
		'success'
	]);
	const list = ref([])
	const realName = ref()
	const init = async () => {
		uni.showLoading({
			title: "加载中..."
		})
		const { data } = await dxrequest("/api/user/page", {
			limit: 999,
			isAuthentication: true,
			roleIdList: 1766444837311168514,
			realName: realName.value

		})
		list.value = data.list
		uni.hideLoading()
	}
	init()

	const cxxzfdft = (data) => {
		emit("success", data)
	}
</script>

<style scoped>

</style>